package com.decent.task.demo;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 演示job
 *
 * @author wangyan
 **/
@Slf4j
@Component
public class DemoJob {

    /**
     * demo演示
     */
    @XxlJob("demoJob")
    public ReturnT<String> demoJob(String param) {
        log.debug("||| demoJob JobParam[{}]", param);
        try {
            log.info("1+1=2");
        } catch (Exception e) {
            log.error("demoJob e =", e);
        }
        return ReturnT.SUCCESS;
    }
}
